package Interface
{
	import flash.display.MovieClip;
	
	public class CGameStateUI_Play
	{
		private var m_refUIMovieClip :CMC_GameState_Play;
		
		public function CGameStateUI_Play(cMovieClip :MovieClip)
		{
			m_refUIMovieClip = cMovieClip as CMC_GameState_Play;
		}
		public function UpdateUI_MungLength(nLength :int, nHighestLength :int) :void
		{
			m_refUIMovieClip.textMung.text = nLength.toString();
			m_refUIMovieClip.textHighestMung.text = nHighestLength.toString();
		}
		public function UpdateUI_Score() :void
		{
			var nScore :uint = CGameScoreManager.instance.GetScore();
			m_refUIMovieClip.textScore.text = nScore.toString();
		}
		public function UpdateUI_Time(nTime :uint) :void
		{
			m_refUIMovieClip.textTime.text = nTime.toString();
		}
		public function UpdateUI_EatedFoodCount() :void
		{
			m_refUIMovieClip.textEatedFoodCount.text = CGameScoreManager.instance.nEatedFoodCount.toString();
		}
		public function UpdateUI_Gold() :void
		{
			m_refUIMovieClip.textGold.text = CGameScoreManager.instance.nGold.toString();
		}
		public function UpdateUI_CPFLv() :void
		{
			if (CGameScoreManager.instance.nCreamPuffFactoryLevel == CGameScoreManager.MAX_LEVEL_CPF)
			{
				m_refUIMovieClip.textCPFLv.text = "MAX";
			}
			else
			{
				m_refUIMovieClip.textCPFLv.text = CGameScoreManager.instance.nCreamPuffFactoryLevel.toString();
			}
		}
		public function UpdateUI_GoldToUpgradeCPF(nGoldToUpgrade :int) :void
		{
			m_refUIMovieClip.textGoldToUpgrade.text = nGoldToUpgrade.toString();
		}

	}
}